package org.example.platform.design.yuanxing;

import lombok.Data;

@Data
public class JianliVo implements Cloneable{
    private String name;
    private String age;
    private String sex;
    private String work;
    private Company company;

    public JianliVo(String name){
        this.name= name;
        company = new Company();
    }



    public JianliVo(Company company) throws CloneNotSupportedException {
        this.company= (Company) company.clone();
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        // 浅拷贝
        return super.clone();
    }
}
